package com.googlecode.trabhci2011.stockmarket.client;

import com.google.gwt.canvas.client.Canvas;
import com.google.gwt.canvas.dom.client.Context2d;
import java.util.HashMap;
import java.util.Vector;

import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.googlecode.trabhci2011.stockmarket.shared.StockDataEntry;

public class StockCanvas {
	private HashMap<String,Vector<StockDataEntry>> data = new HashMap<String, Vector<StockDataEntry>>();
	private HorizontalPanel hp = new HorizontalPanel();
  private Canvas drawCanvas = null;
  private Context2d context = null;
	
	public StockCanvas(HashMap<String,Vector<StockDataEntry>> d){
    drawCanvas = Canvas.createIfSupported();
    
    if(drawCanvas==null) {
      hp.add(new Label("Your browser does not support the canvas tag."));
    }

    drawCanvas.setWidth("400px");
    drawCanvas.setHeight("400px");
    drawCanvas.setCoordinateSpaceHeight(400);
    drawCanvas.setCoordinateSpaceWidth(400);

    hp.add(drawCanvas);

		data = d;
	}
	
	public void update(){
		
	}
	
	public HorizontalPanel getPanel() {
		return hp;
	}
}
